package com.ddmh.minio.handler;

import org.springframework.context.ApplicationContext;

/**
 * 简述
 *
 * @author brant
 * @since 2024-04-12
 */
public class SpringContextHolder {
    private static ApplicationContext applicationContext;

    public static void setApplicationContext(ApplicationContext applicationContext) {
        SpringContextHolder.applicationContext = applicationContext;
    }

    public static <T> T getBean(String name, Class<T> clazz) {
        return applicationContext.getBean(name, clazz);
    }
}
